<template>
  <div class="left-sider">
    <!-- 用户信息区域 -->
    <div class="user-info">
      <div class="avatar">
        <img src="@/assets/images/avatar.jpg" alt="avatar" />
      </div>
      <div class="username">
        <span>Kuriyama Mirai Player</span>
        <div class="github-info">
          <i class="fab fa-github"></i>
          <span>XiangZi_329</span>
        </div>
      </div>
    </div>

    <!-- 导航菜单区域 -->
    <div class="menu-section">
        <div class="menu-list">
            <router-link to="/music" class="menu-item">
                <i class="fas fa-home"></i>
                <span>首页</span>
            </router-link>
        </div>       
      <div class="section-title">发现</div>
      <div class="menu-list">
        <router-link to="/music/selected-playlists" class="menu-item">
          <i class="fas fa-list-ul"></i>
          <span>精选歌单</span>
        </router-link>
        <router-link to="/music/popular-playlists" class="menu-item">
          <i class="fas fa-film"></i>
          <span>热门榜单</span>
        </router-link>
        <router-link to="/music/new-songs" class="menu-item">
          <i class="fas fa-music"></i>
          <span>新歌首发</span>
        </router-link>
        <router-link to="/music/recommendation-mv" class="menu-item">
          <i class="fas fa-video"></i>
          <span>推荐MV</span>
        </router-link>
      </div>
    </div>

    <!-- 实验性测试区域 -->
    <div class="menu-section">
      <div class="section-title">实验性测试</div>
      <div class="menu-list">
        <router-link to="/music/deepseek" class="menu-item">
          <i class="fas fa-robot"></i>
          <span>DeepSeek</span>
        </router-link>
        <router-link to="/music/tools" class="menu-item">
          <i class="fas fa-wrench"></i>
          <span>工具</span>
        </router-link>
      </div>
    </div>

    <!-- 设置区域 -->
    <div class="menu-section">
      <div class="section-title">设置</div>
      <div class="menu-list">
        <router-link to="/music/settings" class="menu-item">
          <i class="fas fa-cog"></i>
          <span>设置</span>
        </router-link>
        <router-link to="/music/theme" class="menu-item">
          <i class="fas fa-palette"></i>
          <span>主题</span>
        </router-link>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
// 组件逻辑代码
import {
  Search,
} from '@element-plus/icons-vue'
</script>

<style scoped lang="scss">
.left-sider {
  width: 200px;
  height: 100%;
  background-color: #fff;
  border-right: 1px solid #eee;
  padding: 20px 0;
  margin-top: 60px;

  .user-info {
    padding: 0 16px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding-top: 20px;

    .avatar {
      width: 64px;
      height: 64px;
      border-radius: 50%;
      overflow: hidden;
      border: 2px solid #eee;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      
      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
    }

    .username {
      text-align: center;
      
      span {
        font-size: 16px;
        font-weight: 500;
        color: #333;
      }

      .github-info {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        margin-top: 4px;
        padding: 2px 8px;
        background-color: #24292e;
        border-radius: 15px;
        
        i {
          font-size: 14px;
          color: #fff;
        }

        span {
          font-size: 12px;
          color: #fff;
          font-weight: normal;
        }
      }
    }
  }

  .menu-section {
    margin-bottom: 20px;

    .section-title {
      padding: 0 16px;
      font-size: 12px;
      color: #999;
      margin-bottom: 8px;
    }

    .menu-list {
      .menu-item {
        padding: 0 16px;
        height: 40px;
        display: flex;
        align-items: center;
        cursor: pointer;
        text-decoration: none;
        color: inherit;
        
        &:hover {
          background-color: #f5f5f5;
        }

        i {
          margin-right: 8px;
          font-size: 18px;
        }

        .icon-plus {
          margin-left: auto;
        }
      }
    }
  }
}
</style>
